Modern computing systems such as smartphones, tablets, and other mobile devices enable users to install and run various applications. These mobile applications typically provide a wide range of functionality, such as streaming video, social networking, games, email, instant messaging, weather, navigation, or any other mobile application. An application may be referred to as “native” when the application program code has been developed for use on a particular platform or device. A “webview” typically describes a web browser bundled inside of a mobile application, resulting in what is termed a “hybrid” application. The webview feature of a mobile application can enable a uniform resource locator (URL) to be loaded by the browser within the application, instead of launching a separate browser application. The hypertext markup language (HTML), JavaScript, and other web code can then run in the internal webview browser that is wrapped inside the native application.
In the fields of computer hardware and software technology, application developers commonly use test features such as A/B testing, staged rollouts, and feature toggling to test various features on subsets of the user base. For example, A/B testing, also called split testing, provides for simultaneously testing a modified version, or variant, against a pre-existing version by splitting the two versions between different user groups and monitoring the results. Staged rollout is another testing technique (also referred to as “slow rollout” or “phased rollout”), which involves pushing out a feature gradually to increasing numbers of the user base. Feature toggling, or feature flagging, is a technique where a new area of code or a newly designed feature is compartmentalized to facilitate activation and deactivation of the feature without affecting the rest of the application. The feature toggling technique enables developers to push out partially tested code in a way where the code can be shut off quickly without a new build release if any problems are detected. The above techniques can also be combined effectively. For example, once a feature is behind a flag, an application developer can expose it to a small subset of users to ensure a feature works as planned, and subsequently push the feature out to the remaining users gradually.
In various runtime environments, it is possible to modify how a method, function, class, or other such software component maps to the actual code implementation of the component. Sometimes referred to as swizzling, such re-mapping technology allows code associated with one function to be replaced by code associated with another function. This may be useful in the context of making modifications to a user interface of an application, for example. Some implementations of re-mapping technology involve modifying the value of a pointer that points to a location in memory where a method is implemented in code. By changing the value of the pointer, the method can be made to point to other code such that, when the method is called, a different method is employed in its place. The target method that is called in place of the original method is sometimes referred to as a callback function. Such techniques may enable a software development toolkit (SDK) to make modifications to an application without altering the main program code of the application.
Overview
Provided herein are techniques to facilitate modification of content displayed in a webview embedded into a mobile application. In at least one implementation, webview modification instructions provided by an application development and optimization platform are received that indicate modified webview content associated with a uniform resource identifier (URI) accessed by the mobile application in the webview. Execution of the mobile application is monitored for an occurrence of an event that triggers loading of the URI in the webview of the mobile application. Responsive to the event, the webview modification instructions are executed to present the modified webview content in the webview of the mobile application.
This Overview is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. It may be understood that this Overview is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.